package com.gxa.controller;

import com.gxa.common.R;
import com.gxa.pojo.Receipt_Order;
import com.gxa.service.AddOrderService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

@Controller
@Api(value = "添加客户订单数据test",tags = "添加客户订单接口API")
public class AddOrderController {
    R r = new R();
    @Autowired(required = false)
    private AddOrderService addOrderService;

    @RequestMapping(value = "/addOrder",method = RequestMethod.POST)
    @ApiOperation(value = "新增调拨单接口",notes = "添加调拨单",httpMethod = "POST", response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R saveOrderForm(@RequestBody @ApiParam(name = "receipt_order",value = "添加客户订单",required = true) Receipt_Order receipt_order) {
        R r = addOrderService.saveOrderForm(receipt_order);
        return r;
    }
}
